/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package air_hockey_v2.engine;

/**
 *
 * @author cooler
 */
public abstract class Itens {

    protected int x, //position x
            y, //position y
            vx, //velocity x
            vy; //velocity y

    public synchronized void setVx(int vx) {
        if (Math.abs(vx) < 7) {
            this.vx = vx;
        }
    }

    public synchronized void setVy(int vy) {
        if (Math.abs(vy) < 7) {
            this.vy = vy;
        }
    }

    public synchronized int getVx() {
        return vx;
    }

    public synchronized int getVy() {
        return vy;
    }

    public abstract void move(int x, int y);

    /**
     * @return the x
     */
    public synchronized int getX() {
        return x;
    }

    /**
     * @param x the x to set
     */
    public synchronized void setX(int x) {
        this.x = x;
    }

    /**
     * @return the y
     */
    public synchronized int getY() {
        return y;
    }

    /**
     * @param y the y to set
     */
    public synchronized void setY(int y) {
        this.y = y;
    }

    public void colisao(Itens item) {
    }

    public boolean isColisao(int x, int y, Itens item) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public void melhorXY(int x, int y, Itens item) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public void setVxM(int vx) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public void setVyM(int vy) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public Pontos getPontos() {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
